package com.dp.mallchat.common.user.service;

import com.dp.mallchat.common.common.domain.vo.req.PageBaseReq;
import com.dp.mallchat.common.common.domain.vo.resp.PageBaseResp;
import com.dp.mallchat.common.user.domain.entity.UserApply;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dp.mallchat.common.user.domain.user.req.FriendApplyReq;
import com.dp.mallchat.common.user.domain.user.resp.FriendCheckResp;
import com.dp.mallchat.common.user.domain.user.resp.FriendUnreadResp;
import com.dp.mallchat.common.user.domain.user.resp.UserApplyPageResp;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * <p>
 * 用户申请表 服务类
 * </p>
 *
 * @author <a href="https://gitee.com/baiDP">adu</a>
 * @since 2024-06-19
 */
public interface UserApplyService extends IService<UserApply> {

    /**
     * 用户申请列表
     * @param uid uid
     * @param pageBaseReq 分页请求
     * @return
     */
    PageBaseResp<UserApplyPageResp> pageApply(Long uid, PageBaseReq pageBaseReq);


    /**
     * 用户申请列表未读数
     * @param uid uid
     * @return
     */
    FriendUnreadResp unread(Long uid);

    /**
     * 好有申请
     * @param uid uid
     * @param req 请求参数
     */
    void apply(Long uid, FriendApplyReq req);

    /**
     * 用户申请审批
     * @param uid   uid
     * @param applyId   审批id
     */
    void applyApproval(Long uid, Long applyId);

    /**
     * 校验是否为自己好友
     * @param uid uid
     * @param uidList
     * @return
     */
    FriendCheckResp check(Long uid, List<Long> uidList);
}
